Skip to content

Comments

build: 添加 fixed-webview 构建版本#73

Closed
Rbqwow wants to merge 9 commits intoMistEO:mainfrom
Rbqwow:build/add-webview2-windows-version
Closed

build: 添加 fixed-webview 构建版本#73
Rbqwow wants to merge 9 commits intoMistEO:mainfrom
Rbqwow:build/add-webview2-windows-version

Conversation

@Rbqwow
Copy link

@Rbqwow Rbqwow commented Feb 19, 2026

需要在 MaaEnd/MaaEnd#618 之前合并,还得发个版


这套不能给arm64打包,等我换个方案


从nyanpasu那里抄了一下思路,改完了
AGPL就是好,可以到处抄(


好了 现在和gpl完全没关系了 只抄思路不算抄)

Summary by Sourcery

添加一个在 Windows 平台上的构建变体,该变体会打包一个固定版本的 WebView2 运行时,并调整应用启动逻辑,使其优先使用打包的运行时,仅在不存在打包运行时时才触发 WebView2 的安装。

增强内容:

  • 更新 Tauri 应用的启动流程,在可用时使用打包的 WebView2 运行时目录,只有在未配置打包运行时时,才回退到系统 WebView2 的自动安装。

构建:

  • 扩展 GitHub Actions 的 Windows 工作流,为 x86_64 构建打包一个包含已复制 WebView2 运行时的 fixed-webview 工件。
Original summary in English

Summary by Sourcery

Add a Windows build variant that bundles a fixed WebView2 runtime and adjust the application startup logic to prefer the bundled runtime while only triggering WebView2 installation when no bundled runtime is present.

Enhancements:

  • Update the Tauri application startup to use a bundled WebView2 runtime directory when available and fall back to system WebView2 auto-installation only if no bundled runtime is configured.

Build:

  • Extend the GitHub Actions Windows workflow to package a fixed-webview artifact that includes a copied WebView2 runtime for x86_64 builds.

Summary by Sourcery

添加一个 Windows 构建变体,其中捆绑固定版本的 WebView2 运行时,并更新启动逻辑:优先使用捆绑的运行时,仅在必要时回退到系统安装的运行时。

增强功能:

  • 调整 Tauri 应用启动流程:在存在捆绑的 WebView2 运行时时使用其目录,仅在未配置捆绑运行时时才触发 WebView2 的安装。

构建:

  • 扩展 Windows GitHub Actions 工作流,以下载特定版本的 WebView2 固定版本运行时,并为每种架构额外发布一个 fixed-webview 构件(artifact)。
Original summary in English

Summary by Sourcery

Add a Windows build variant that bundles a fixed WebView2 runtime and updates startup logic to prefer the bundled runtime while falling back to system installation only when necessary.

Enhancements:

  • Adjust the Tauri application startup to use a bundled WebView2 runtime directory when present and only trigger WebView2 installation if no bundled runtime is configured.

Build:

  • Extend the Windows GitHub Actions workflow to download a specific WebView2 fixed-version runtime and publish an additional fixed-webview artifact per architecture.

Summary by Sourcery

添加一个 Windows 构建变体,捆绑一个固定版本的 WebView2 运行时,并更新启动行为:优先使用捆绑的运行时,仅在不存在捆绑运行时时才从系统安装 WebView2。

Enhancements:

  • 调整 Tauri 启动逻辑,在有捆绑的 WebView2 运行时目录时使用该目录,只有在未配置捆绑运行时时才触发 WebView2 安装。

Build:

  • 扩展 Windows GitHub Actions 工作流,下载指定版本的 WebView2 固定版本运行时,并针对每种架构发布额外的 fixed-webview 构建产物。
Original summary in English

Summary by Sourcery

Add a Windows build variant that bundles a fixed WebView2 runtime and updates startup behavior to prefer the bundled runtime while only installing WebView2 from the system when no bundled runtime is present.

Enhancements:

  • Adjust Tauri startup to use a bundled WebView2 runtime directory when available and only trigger WebView2 installation if no bundled runtime is configured.

Build:

  • Extend the Windows GitHub Actions workflow to download a specific WebView2 fixed-version runtime and publish an additional fixed-webview artifact per architecture.

Summary by Sourcery

添加一个包含固定版本 WebView2 运行时的 Windows 构建变体,并更新应用启动逻辑,使其优先使用捆绑的运行时,仅在不存在捆绑运行时时才安装 WebView2。

增强功能:

  • 调整 Tauri 启动流程,在可用时使用捆绑的 WebView2 运行时目录,并在这种情况下跳过系统 WebView2 的安装。

构建:

  • 扩展 Windows GitHub Actions 工作流程,下载固定版本的 WebView2 运行时,并为每个架构发布一个额外的 fixed-webview 构建产物。
Original summary in English

Summary by Sourcery

Add a Windows build variant that bundles a fixed WebView2 runtime and updates the app startup to prefer the bundled runtime while only installing WebView2 when no bundled runtime is present.

Enhancements:

  • Adjust Tauri startup to use a bundled WebView2 runtime directory when available and skip system WebView2 installation in that case.

Build:

  • Extend the Windows GitHub Actions workflow to download a fixed WebView2 runtime and publish an additional fixed-webview artifact for each architecture.

Copilot AI review requested due to automatic review settings February 19, 2026 12:14
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我发现了 1 个问题

面向 AI Agents 的提示
请根据本次代码审查中的评论进行修改:

## 单条评论

### 评论 1
<location> `.github/workflows/build.yml:134-135` </location>
<code_context>
+        shell: pwsh
+        run: |
+          # 优先使用 WebView2 Runtime,其次使用 Edge 安装目录
+          $wv2Base = "C:\Program Files (x86)\Microsoft\EdgeWebView\Application"
+          if (-not (Test-Path $wv2Base)) {
+            $wv2Base = "C:\Program Files (x86)\Microsoft\Edge\Application"
+          }
</code_context>

<issue_to_address>
**suggestion:** 建议同时检测 64 位的安装路径,以改进对 WebView2/Edge 的检测。

在某些系统上,WebView2/Edge 会安装在 `C:\Program Files\...`(64 位)而不是 `C:\Program Files (x86)\...` 下,因此如果仅检测 x86 路径,可能会错误地认为没有可用的 runtime。建议同时检查 `Program Files (x86)``Program Files` 两个目录,并在失败前从所有路径中选择发现的最新版本。
</issue_to_address>

Sourcery 对开源项目是免费的——如果你觉得我们的评审有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据反馈改进之后的评审。
Original comment in English

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `.github/workflows/build.yml:134-135` </location>
<code_context>
+        shell: pwsh
+        run: |
+          # 优先使用 WebView2 Runtime,其次使用 Edge 安装目录
+          $wv2Base = "C:\Program Files (x86)\Microsoft\EdgeWebView\Application"
+          if (-not (Test-Path $wv2Base)) {
+            $wv2Base = "C:\Program Files (x86)\Microsoft\Edge\Application"
+          }
</code_context>

<issue_to_address>
**suggestion:** Consider also probing 64-bit installation paths to improve WebView2/Edge detection.

On some systems WebView2/Edge installs under `C:\Program Files\...` (64-bit) rather than `C:\Program Files (x86)\...`, so limiting detection to the x86 path can incorrectly report that no runtime is available. Consider checking both `Program Files (x86)` and `Program Files`, then selecting the newest version found across all paths before failing.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for a "fixed-webview" build variant that bundles a fixed version of the WebView2 runtime with the Windows x86_64 distribution. This allows users to run the application without needing to install or rely on the system-installed WebView2 runtime.

Changes:

  • Modified startup logic to detect and use bundled WebView2 runtime from webview2_runtime directory
  • Updated fallback behavior to only attempt system WebView2 installation when no bundled runtime is present
  • Added CI workflow step to create fixed-webview build artifacts for Windows x86_64

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src-tauri/src/main.rs Added detection logic for bundled WebView2 runtime directory and conditional system WebView2 installation
.github/workflows/build.yml Added workflow steps to copy WebView2 runtime from GitHub Actions Windows runner and upload as separate artifact
Comments suppressed due to low confidence (1)

.github/workflows/build.yml:130

  • The fixed-webview variant is only built for x86_64 architecture. This asymmetry means aarch64 Windows users won't have access to a bundled WebView2 runtime. If this is intentional due to WebView2 availability or testing constraints on ARM64, consider adding a comment explaining why. Otherwise, consider enabling this for aarch64 as well, or document the limitation in the PR description.
        if: matrix.arch == 'x86_64'

@Rbqwow Rbqwow marked this pull request as draft February 19, 2026 12:30
@Rbqwow
Copy link
Author

Rbqwow commented Feb 19, 2026

@sourcery-ai review

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我发现了两个问题,并给出了一些整体反馈:

  • 当前工作流会针对所有 Windows 架构都执行 WebView2 固定版本运行时的下载步骤,但注释指出 arm64 打包尚未支持;建议为该步骤以及 fixed-webview 构件上传添加条件(例如 if: matrix.arch == 'x86_64'),以避免在不支持的架构上出现失败或产生误导性的构件。
  • WebView2 固定版本运行时的版本号目前是硬编码在工作流里的;建议把它提取到一个统一的 env/matrix 变量中(并考虑在构件名称或日志输出中复用它),这样以后升级版本时就不容易出错。
面向 AI 代理的提示词
Please address the comments from this code review:

## Overall Comments
- The workflow always runs the WebView2 fixed-runtime download for all Windows architectures, but the comment notes that arm64 packaging is not supported yet; consider guarding this step and the `fixed-webview` artifact upload with a condition (e.g. `if: matrix.arch == 'x86_64'`) to avoid failures or misleading artifacts for unsupported arches.
- The WebView2 fixed runtime version is currently hardcoded in the workflow; extracting it to a single env/matrix variable (and possibly reusing it in the artifact name or log output) would make future version bumps less error‑prone.

## Individual Comments

### Comment 1
<location> `.github/workflows/build.yml:134-136` </location>
<code_context>
+        run: |
+          $archMap = @{ 'x86_64' = 'x64'; 'aarch64' = 'arm64' }
+          $arch = $archMap['${{ matrix.arch }}']
+          $version = '133.0.3065.92'
+          $cabName = "Microsoft.WebView2.FixedVersionRuntime.$version.$arch.cab"
+          $uri = "https://github.com/westinyang/WebView2RuntimeArchive/releases/download/$version/$cabName"
+
+          Write-Host "Downloading $cabName ..."
</code_context>

<issue_to_address>
**🚨 issue (security):** Relying on a third-party GitHub mirror without integrity checks introduces supply-chain risk.

This downloads `westinyang/WebView2RuntimeArchive` artifacts without any integrity verification, so a compromise of that repo/release would inject a malicious WebView2 runtime into your CI artifacts. Please either fetch the runtime from an official Microsoft source or add a pinned checksum verification of the CAB before using it to mitigate this supply-chain risk.
</issue_to_address>

### Comment 2
<location> `.github/workflows/build.yml:129-135` </location>
<code_context>
+      - name: Download WebView2 Fixed Version Runtime
+        shell: pwsh
+        run: |
+          $archMap = @{ 'x86_64' = 'x64'; 'aarch64' = 'arm64' }
+          $arch = $archMap['${{ matrix.arch }}']
+          $version = '133.0.3065.92'
+          $cabName = "Microsoft.WebView2.FixedVersionRuntime.$version.$arch.cab"
</code_context>

<issue_to_address>
**suggestion:** Handle unknown architectures more defensively to avoid silent misconfiguration.

If `matrix.arch` ever changes (e.g. to `amd64`) or a new architecture is added, `$archMap[...]` will return `$null`, producing an invalid CAB name/URL and a confusing failure. Consider validating the key first and throwing a clear error when it’s missing:

```pwsh
$matrixArch = '${{ matrix.arch }}'
if (-not $archMap.ContainsKey($matrixArch)) {
  throw "Unsupported architecture: $matrixArch"
}
$arch = $archMap[$matrixArch]
```

```suggestion
      - name: Download WebView2 Fixed Version Runtime
        shell: pwsh
        run: |
          $archMap = @{ 'x86_64' = 'x64'; 'aarch64' = 'arm64' }
          $matrixArch = '${{ matrix.arch }}'
          if (-not $archMap.ContainsKey($matrixArch)) {
            throw "Unsupported architecture: $matrixArch"
          }
          $arch = $archMap[$matrixArch]
          $version = '133.0.3065.92'
          $cabName = "Microsoft.WebView2.FixedVersionRuntime.$version.$arch.cab"
```
</issue_to_address>

Sourcery 对开源项目免费——如果你觉得我们的评审有帮助,欢迎帮忙分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English

Hey - I've found 2 issues, and left some high level feedback:

  • The workflow always runs the WebView2 fixed-runtime download for all Windows architectures, but the comment notes that arm64 packaging is not supported yet; consider guarding this step and the fixed-webview artifact upload with a condition (e.g. if: matrix.arch == 'x86_64') to avoid failures or misleading artifacts for unsupported arches.
  • The WebView2 fixed runtime version is currently hardcoded in the workflow; extracting it to a single env/matrix variable (and possibly reusing it in the artifact name or log output) would make future version bumps less error‑prone.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The workflow always runs the WebView2 fixed-runtime download for all Windows architectures, but the comment notes that arm64 packaging is not supported yet; consider guarding this step and the `fixed-webview` artifact upload with a condition (e.g. `if: matrix.arch == 'x86_64'`) to avoid failures or misleading artifacts for unsupported arches.
- The WebView2 fixed runtime version is currently hardcoded in the workflow; extracting it to a single env/matrix variable (and possibly reusing it in the artifact name or log output) would make future version bumps less error‑prone.

## Individual Comments

### Comment 1
<location> `.github/workflows/build.yml:134-136` </location>
<code_context>
+        run: |
+          $archMap = @{ 'x86_64' = 'x64'; 'aarch64' = 'arm64' }
+          $arch = $archMap['${{ matrix.arch }}']
+          $version = '133.0.3065.92'
+          $cabName = "Microsoft.WebView2.FixedVersionRuntime.$version.$arch.cab"
+          $uri = "https://github.com/westinyang/WebView2RuntimeArchive/releases/download/$version/$cabName"
+
+          Write-Host "Downloading $cabName ..."
</code_context>

<issue_to_address>
**🚨 issue (security):** Relying on a third-party GitHub mirror without integrity checks introduces supply-chain risk.

This downloads `westinyang/WebView2RuntimeArchive` artifacts without any integrity verification, so a compromise of that repo/release would inject a malicious WebView2 runtime into your CI artifacts. Please either fetch the runtime from an official Microsoft source or add a pinned checksum verification of the CAB before using it to mitigate this supply-chain risk.
</issue_to_address>

### Comment 2
<location> `.github/workflows/build.yml:129-135` </location>
<code_context>
+      - name: Download WebView2 Fixed Version Runtime
+        shell: pwsh
+        run: |
+          $archMap = @{ 'x86_64' = 'x64'; 'aarch64' = 'arm64' }
+          $arch = $archMap['${{ matrix.arch }}']
+          $version = '133.0.3065.92'
+          $cabName = "Microsoft.WebView2.FixedVersionRuntime.$version.$arch.cab"
</code_context>

<issue_to_address>
**suggestion:** Handle unknown architectures more defensively to avoid silent misconfiguration.

If `matrix.arch` ever changes (e.g. to `amd64`) or a new architecture is added, `$archMap[...]` will return `$null`, producing an invalid CAB name/URL and a confusing failure. Consider validating the key first and throwing a clear error when it’s missing:

```pwsh
$matrixArch = '${{ matrix.arch }}'
if (-not $archMap.ContainsKey($matrixArch)) {
  throw "Unsupported architecture: $matrixArch"
}
$arch = $archMap[$matrixArch]
```

```suggestion
      - name: Download WebView2 Fixed Version Runtime
        shell: pwsh
        run: |
          $archMap = @{ 'x86_64' = 'x64'; 'aarch64' = 'arm64' }
          $matrixArch = '${{ matrix.arch }}'
          if (-not $archMap.ContainsKey($matrixArch)) {
            throw "Unsupported architecture: $matrixArch"
          }
          $arch = $archMap[$matrixArch]
          $version = '133.0.3065.92'
          $cabName = "Microsoft.WebView2.FixedVersionRuntime.$version.$arch.cab"
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

@Rbqwow
Copy link
Author

Rbqwow commented Feb 19, 2026

@sourcery-ai review

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我在这里给出了一些整体性的反馈:

  • main.rs 中,只要设置了 WEBVIEW2_BROWSER_EXECUTABLE_FOLDER,你就会跳过调用 webview2::ensure_webview2(),但没有验证该路径是否真的存在;建议在跳过安装之前检查该目录是否存在且有效,这样当环境变量配置错误时就能避免一些令人困惑的故障。
  • WebView2 运行时的下载步骤在工作流中直接硬编码了版本和 GUID 映射;建议把这些提取为命名清晰的变量,或者放入单独的脚本中,这样将来更新运行时版本(以及相应的 GUID)时就更不容易出错。
提供给 AI 代理的提示
Please address the comments from this code review:

## Overall Comments
- In `main.rs`, you skip `webview2::ensure_webview2()` whenever `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` is set, but don’t verify that the path actually exists; consider checking that the directory is present/valid before skipping installation to avoid confusing failures when the env var is set incorrectly.
- The WebView2 runtime download step hardcodes the version and GUID map directly in the workflow; consider centralizing these as clearly named variables or a separate script so that updating the runtime version (and matching GUIDs) is less error‑prone in future.

Sourcery 对开源项目是免费的——如果你觉得我们的评审有帮助,欢迎帮忙分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English

Hey - I've left some high level feedback:

  • In main.rs, you skip webview2::ensure_webview2() whenever WEBVIEW2_BROWSER_EXECUTABLE_FOLDER is set, but don’t verify that the path actually exists; consider checking that the directory is present/valid before skipping installation to avoid confusing failures when the env var is set incorrectly.
  • The WebView2 runtime download step hardcodes the version and GUID map directly in the workflow; consider centralizing these as clearly named variables or a separate script so that updating the runtime version (and matching GUIDs) is less error‑prone in future.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `main.rs`, you skip `webview2::ensure_webview2()` whenever `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` is set, but don’t verify that the path actually exists; consider checking that the directory is present/valid before skipping installation to avoid confusing failures when the env var is set incorrectly.
- The WebView2 runtime download step hardcodes the version and GUID map directly in the workflow; consider centralizing these as clearly named variables or a separate script so that updating the runtime version (and matching GUIDs) is less error‑prone in future.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

.github/workflows/build.yml:165

  • The Remove-Item command could fail if files are in use or permissions are insufficient, but errors are silently ignored. While this might be intentional for cleanup, it could hide issues. Consider adding -ErrorAction SilentlyContinue explicitly to document the intentional error suppression, or remove the -Force flag and let it fail gracefully if cleanup is important.
          Remove-Item $cabName, $tempDir -Recurse -Force

讲真我感觉用不上加 但这就是vibe coding的魅力
@Rbqwow Rbqwow marked this pull request as ready for review February 19, 2026 13:55
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我发现了 1 个问题

给 AI 代理的提示词
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `src-tauri/src/main.rs:19-26` </location>
<code_context>
                 std::env::set_var("WEBVIEW2_USER_DATA_FOLDER", &webview_data_dir);
+
+                // 检测内置的 WebView2 固定版本运行时
+                let webview2_runtime_dir = exe_dir.join("webview2_runtime");
+                if webview2_runtime_dir.exists() {
+                    std::env::set_var(
+                        "WEBVIEW2_BROWSER_EXECUTABLE_FOLDER",
</code_context>

<issue_to_address>
**suggestion (bug_risk):** 使用目录级别的检查而不是 `exists()`,以避免配置错误。

如果 `webview2_runtime` 是一个文件或损坏的符号链接,`exists()` 仍然会返回 true,我们就会把 `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` 设置为一个无效路径,从而在后续造成更难排查的故障。使用 `webview2_runtime_dir.is_dir()` 可以确保只有在该路径确实是包含运行时的目录时,才会设置这个环境变量。

```suggestion
                // 检测内置的 WebView2 固定版本运行时
                let webview2_runtime_dir = exe_dir.join("webview2_runtime");
                if webview2_runtime_dir.is_dir() {
                    std::env::set_var(
                        "WEBVIEW2_BROWSER_EXECUTABLE_FOLDER",
                        &webview2_runtime_dir,
                    );
                }
```
</issue_to_address>

Sourcery 对开源是免费的——如果你觉得我们的评审有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会利用这些反馈来改进后续的评审。
Original comment in English

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `src-tauri/src/main.rs:19-26` </location>
<code_context>
                 std::env::set_var("WEBVIEW2_USER_DATA_FOLDER", &webview_data_dir);
+
+                // 检测内置的 WebView2 固定版本运行时
+                let webview2_runtime_dir = exe_dir.join("webview2_runtime");
+                if webview2_runtime_dir.exists() {
+                    std::env::set_var(
+                        "WEBVIEW2_BROWSER_EXECUTABLE_FOLDER",
</code_context>

<issue_to_address>
**suggestion (bug_risk):** Use a directory-specific check instead of exists() to avoid misconfiguration.

If `webview2_runtime` is a file or broken symlink, `exists()` still returns true and we’ll set `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` to an invalid path, causing harder-to-diagnose failures later. Using `webview2_runtime_dir.is_dir()` ensures the env var is only set when the path is actually a directory containing the runtime.

```suggestion
                // 检测内置的 WebView2 固定版本运行时
                let webview2_runtime_dir = exe_dir.join("webview2_runtime");
                if webview2_runtime_dir.is_dir() {
                    std::env::set_var(
                        "WEBVIEW2_BROWSER_EXECUTABLE_FOLDER",
                        &webview2_runtime_dir,
                    );
                }
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
@MistEO
Copy link
Owner

MistEO commented Feb 19, 2026

不要这玩意,内置 webview 我干嘛不直接用 electron

现在一启动就有提示 webview 不可用并自动下载,已经足够覆盖绝大多数情况了

@Rbqwow
Copy link
Author

Rbqwow commented Feb 19, 2026

#75

@Rbqwow Rbqwow closed this Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants